package com.yic.module.wms.service.inventory;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @Author: Ljx
 * @createTime: 2023年12月13日 09:01:32
 * @version: v1.0.0
 * @Description: 库存操作服务
 */
public interface InventoryService {

    /**
     * 增加库存操作
     * @param factoryId
     * @param warehouseId
     * @param areaId
     * @param locationId
     * @param itemId
     * @param itemWarehouseId
     * @param amount
     * @param batchNo
     * @param serialNo
     * @param remark
     * @param operateTime
     */
    void increaseInventory(Long factoryId, Long warehouseId, Long areaId, Long locationId, Long itemId, Long itemWarehouseId, BigDecimal amount, String batchNo, String serialNo, String remark, LocalDateTime operateTime, Integer type, Long sourceId, String sourceCode);

    /**
     * 减少库存操作
     * @param factoryId
     * @param warehouseId
     * @param areaId
     * @param locationId
     * @param itemId
     * @param itemWarehouseId
     * @param amount
     * @param batchNo
     * @param serialNo
     * @param remark
     * @param operateTime
     */
    void reduceInventory(Long factoryId, Long warehouseId, Long areaId, Long locationId, Long itemId, Long itemWarehouseId, BigDecimal amount, String batchNo, String serialNo, String remark, LocalDateTime operateTime);


    /**
     * 还原库存操作（撤审撤审增库存）
     * @param warehouseId
     * @param itemWarehouseId
     * @param amount
     */
    void cancelIncreaseInventory(Long warehouseId, Long itemWarehouseId, BigDecimal amount, Integer type, Long sourceId);

    /**
     * 还原库存操作（撤审减库存）
     * @param factoryId
     * @param warehouseId
     * @param areaId
     * @param locationId
     * @param itemId
     * @param itemWarehouseId
     * @param amount
     * @param batchNo
     * @param serialNo
     * @param remark
     * @param type
     * @param sourceId
     * @param sourceCode
     */
    void cancelReduceInventory(Long factoryId, Long warehouseId, Long areaId, Long locationId, Long itemId, Long itemWarehouseId, BigDecimal amount, String batchNo, String serialNo, String remark, Integer type, Long sourceId, String sourceCode);
}
